<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <!--[if lt IE 9]>
<script type="text/javascript" src="../lib/html5.js"></script>
<script type="text/javascript" src="../lib/respond.min.js"></script>
<script type="text/javascript" src="../lib/PIE_IE678.js"></script>
<![endif]-->
    <link href="../lib/layui/css/layui.css" rel="stylesheet" type="text/css" />
    <link href="../css/H-ui.min.css" rel="stylesheet" type="text/css" />
    <link href="../css/H-ui.admin.css" rel="stylesheet" type="text/css" />
    <link href="../lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
    <link href="../lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
    <!--[if IE 6]>
<script type="text/javascript" src="../lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
    <title>月计划</title>
</head>
<body>
    <div class="pd-20">
        <form id="itemEdit" name="itemEdit" method="post" action="../ashx/spui.ashx" class="form form-horizontal">
            <input type="hidden" class="actionValue" id="editAction" name="action" value="add" />
            <input type="hidden" id="id" name="id" />
            <input type="hidden" id="tablename" name="tablename" value="" />
            <input type="hidden" id="tablemidname" name="tablemidname" value="" />
            <input type="hidden" id="ftype" name="ftype" value="1" />
            <input type="hidden" id="fmaintype" name="fmaintype" value="1" />
            <input type="hidden" id="dataneedtouser" name="dataneedtouser" value="1" /><!--是否要包含通用数据必归属处理-->
            <div class="row cl">
                <label class="form-label col-2">名称：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="fmainname" id="fmainname" datatype="*1-22" />
                </div>
                <div class="col-1"></div>
                <label class="form-label col-2">计划类型：</label>
                <div class="formControls col-2">
                    <span class="select-box">
                        <select class="select" size="1" name="ftypename" id="ftypename">
                            <option value="月种植计划">种植计划</option>
                            <!--  <option value="分拆的计划">分拆的种植计划</option>-->
                            <option value="月育苗计划">育苗计划</option>
                        </select>
                    </span>
                </div>
                <div class="col-1"></div>
            </div>
            <div class="row cl">
                <label class="form-label col-2"><span class="c-red">*</span>品种：</label>
                <div class="formControls col-2  layui-form">
                    <select name="ffv1" id='ffv1' lay-filter="ffv1" lay-verify="required" nullmsg="不能为空" datatype="*1-22" lay-search="">
                        <option value="">直接选择或搜索选择</option>
                    </select>
                    <input type="hidden" id="ffv2" name="ffv2" value="" />
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-2">处理组长：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="ffv4" id="ffv4" readonly="readonly" placeholder="右边选择或搜索选择" />
                    <input type="hidden" id="ffv5" name="ffv5" />
                </div>
                <div class="col-3 layui-form">
                    <select name="inoutusernamesel" id='inoutusernamesel' lay-filter="testselect" lay-verify="required" lay-search="">
                        <option value="">直接选择或搜索选择</option>
                    </select>
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-2">*开始时间：</label>
                <div class="formControls col-2">
                    <input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" name="fdt1" id="fdt1" class="input-text Wdate" datatype="*1-22" nullmsg="不能为空" />
                </div>
                <div class="col-1"></div>
                <label class="form-label col-2">*结束时间：</label>
                <div class="formControls col-2">
                    <input type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" name="fdt2" id="fdt2" class="input-text Wdate" datatype="*1-22" nullmsg="不能为空" />
                </div>
                <div class="col-1"></div>

            </div>
            <div class="row cl">
                <label class="form-label col-2"><span class="c-red">*</span>计划面积/盘数：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="fnv1" id="fnv1" datatype="/^-?[1-9]+(\.\d+)?$|^-?0(\.\d+)?$|^-?[1-9]+[0-9]*(\.\d+)?$/" />
                </div>
                <div class="col-1"></div>
                <label class="form-label col-2"><span class="c-red">*</span>规格：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="ffv3" id="ffv3" />
                </div>
                <div class="col-1"></div>
            </div>
            <div class="row cl">
                <div class="col-6 col-offset-5">
                    <button class="btn btn-primary radius" type="submit" id="btsub1">提交</button>&nbsp;&nbsp;
				<button class="btn btn-secondary radius" type="button" id="btn_reset">重置</button>&nbsp;&nbsp;
				<button onclick="layer_close();" class="btn btn-default radius" type="button">返回</button>&nbsp;&nbsp;&nbsp;&nbsp;
     
                </div>
            </div>

            <div id="qrcode"></div>
        </form>
    </div>
    <script src="../hcjsui/Scripts/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="../lib/layui/layui.js"></script>
    <script type="text/javascript" src="../lib/icheck/jquery.icheck.min.js"></script>
    <script type="text/javascript" src="../lib/Validform/5.3.2/Validform.js"></script>
    <script type="text/javascript" src="../lib/layer/1.9.3/layer.js"></script>
    <script src="../hcjsui/js/_Define.js" type="text/javascript"></script>
    <script type="text/javascript" src="../js/hcui.js"></script>
    <script type="text/javascript" src="../js/hcui_au.js"></script>
    <script type="text/javascript" src="../lib/My97DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" src="../lib/jquery.qrcode.min.js"></script>
    <!--以下为多选择下拉ggggggggggggg-->
    <link rel="stylesheet" href="../homepage/css/bootstrap.min.css" type="text/css" />

    <script type="text/javascript">
        HcUiAuloadInfoAuto = false;
        var uiform = null;
        var goload = 0;
        //规格
        hcdosel("dictdata_code as id,dictdata_name as name", "dictionarydata", "dict_code='VegetableType'", "", "", "orderindex",
            function (data) {
                SetSelectWithObjIdName("#ffv5", data);
            });

        //加载处理
        function loadin() {
            //本页面 
            spsetBaseNoBt("hsc_other", "id", "hsc_other as T", "*", "#tablelist", "taskmplanlist", "月计划", "taskmplanlist");
            //人员下拉加载 
            goload++;
            hcdoselbyPost("empid  as id,concat(depname,'-',empname) as name,empname as username,mobile as  tel,depname as address", "view_user", "branchid='" + HCUser.HCUorg + "'", "", "", "id",
                function (data) {
                    goload--;
                    SetSelectWithArrayIdName("#inoutusernamesel", data);
                    if (uiform) uiform.render('select');
                    //因为这个慢，所在加载要从这个开始
                    if (goload <= 0) loadInfoById(aumid, function (data) {
                        loadback(data);
                    });
                });
            goload++;
            hcdoselbyPost("id,concat(fv5,'-',fv1) as name", "yw_baseinfo", "type='1' and  maintype='1' ", "", "", "id",
                        function (data) {
                            goload--;
                            SetSelectWithArrayIdName("#ffv1", data);
                            if (uiform) uiform.render('select');
                            if (goload <= 0) loadInfoById(aumid, function (data) {
                                loadback(data);
                            });
                        });
            ////加载区域
            //hcdoselbyPost("id,fv1 as name", "yw_baseinfo", "type='5' and  maintype='5' and databranchid=" + HCUser.HCUorg, "", "", "id",
            //       function (data) {
            //           SetSelectWithArrayIdName("#fareaid", data);
            //       });

            layui.use(['form'], function () {
                uiform = layui.form();
                uiform.on('select(testselect)', function (data) {
                    $('#ffv5').val(data.value);
                    $('#ffv4').val($("#inoutusernamesel").find("option:selected").text());
                });

                //uiform.on('select(layseltasksctype)', function (data) {
                //    $('#ftasksctypename').val($("#ftasksctype").find("option:selected").text());
                //});
            });

            //if (getUrlParam("action") == "add") {
            //    $("#fgid").val(NewGuid());
            //    console.log(HCUser);
            //    $("#ftaskno").val(HCUser.HCUorgCode + (new Date()).Format("yyyyMMddhhmmss"));

            //}

        }

        function loadback(data) {
            if (uiform) uiform.render();//这个不能去掉,坑啊
        }

        //重写  提交前数据处理
        function hcrBeforeSub() {
            $("#ffv2").val($('#ffv1 option:selected').text());
        }

        ///1030

    </script>
</body>
</html>
